/*
 * @Descripttion:
 * @version:
 * @Author: sueRimn
 * @Date: 2025-07-28 21:14:48
 * @LastEditors: sueRimn
 * @LastEditTime: 2025-07-28 21:23:41
 */

#include "stm32f4xx_hal.h"
#include "main.h"
#include "spi.h"

uint8_t SPI_Trans_rece(uint8_t TX)
{
    uint8_t RX;
    HAL_SPI_TransmitReceive(&hspi3, &TX, &RX, 1, HAL_MAX_DELAY);
    return RX;
}
void SPI_Trans_rece_LEN(uint8_t *rx, uint8_t size) 
{
    uint8_t TX = 0x00;
    HAL_SPI_TransmitReceive(&hspi3, &TX, rx, size, HAL_MAX_DELAY);
}

void BMI088_acc_cs(uint8_t x) 
{
    HAL_GPIO_WritePin(BMI088_ACC_GPIO_Port, BMI088_ACC_Pin, x);
}
void BMI088_gry_cs(uint8_t x) 
{
    HAL_GPIO_WritePin(BMI088_GYR_GPIO_Port, BMI088_GYR_Pin, x);
}
